#region Summary

// 
// Owner : JackieHan 
// 
// Solution : Skomart.Spider 
// 
// Project : Skomart.Spider.Entities
// 
// File : BaseEntity.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 所有实体的父类
// 
// History : 
//			2010-09-08 09:48:06	    Create 
// 

#endregion

#region Using

using System;
using System.Collections.Generic;

#endregion

namespace Jackie.Utility
{
    /// <summary> 
    /// 所有实体的父类
    /// </summary>
    public class BaseEntity
    {
        private long id;
        private string creator;
        private DateTime createDate;
        private string updator;
        private DateTime lastUpdateDate;
        private int version = 0;
        private string remark;

        /// <summary>
        /// 构造函数，自动设置创建时间，更新时间
        /// </summary>
        public BaseEntity()
        {
            createDate = DateTime.Now;
            lastUpdateDate = DateTime.Now;
        }

        /// <summary>
        /// 获取主键标志
        /// </summary>
        public virtual long Id
        {
            get { return id; }
            set { id = value; }
        }

        /// <summary>
        /// 获取或设置创建人
        /// </summary>
        public virtual string Creator
        {
            get { return creator; }
            set { this.creator = value; }
        }

        /// <summary>
        /// 获取创建时间
        /// </summary>
        public virtual DateTime CreateDate
        {
            get { return createDate; }
            private set { this.createDate = value; }
        }

        /// <summary>
        /// 获取或设置最后修改人
        /// </summary>
        public virtual string Updator
        {
            get { return updator; }
            set { updator = value; }
        }

        /// <summary>
        /// 获取最后修改时间
        /// </summary>
        public virtual DateTime LastUpdateDate
        {
            get { return lastUpdateDate; }
            set { this.lastUpdateDate = value; }
        }

        /// <summary>
        /// 数据版本号
        /// </summary>
        public virtual int Version
        {
            get { return version; }
            private set { version = value; }
        }

        /// <summary>
        /// 备注
        /// </summary>
        public virtual string Remark
        {
            get { return remark;}
            set { this.remark = value; }
        }
    }
}